From 7ebfab2a9d2115d8b7b01b4bfcd66b013fb6e3be Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Wed, 10 Jun 2009 00:34:19 +0000 Subject: [PATCH] (compose-gstring-for-terminal): For zero-width characters of Unicode category `Cf', simply replace it with SPC. --- lisp/composite.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/composite.el b/lisp/composite.el index d3c000fe839..ce34336cede 100644 --- a/lisp/composite.el +++ b/lisp/composite.el @@ -681,7 +681,14 @@ a prepending a space before it." (lglyph-set-from-to glyph i i) (setq i (1+ i)))) (if (= (lglyph-width glyph) 0) - (progn + (if (eq (get-char-code-property (lglyph-char glyph) + 'general-category) + 'Cf) + (progn + ;; Compose by replacing with a space. + (lglyph-set-char glyph 32) + (lglyph-set-width glyph 1) + (setq i (1+ i))) ;; Compose by prepending a space. (setq gstring (lgstring-insert-glyph gstring i (lglyph-copy glyph)) -- 2.30.2